public class FulltimeEmployee implements Employee {
    private int weeklyHours;
    private double baseSalary;


    @Override
    public void accept(Department department) {
        department.visit(this);
    }

    public double calculateSalary() {
        double overtime = weeklyHours - 40;
        if (overtime > 0) {
            return baseSalary + overtime * 100;
        } else if (overtime < 0) {
            return Math.max(0, baseSalary + overtime * -80);
        }
        return baseSalary;
    }
    public int getWeeklyHours() {
        return weeklyHours;
}}





